package com.bridge.applets.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bridge.applets.mapper.BridgeIdentifyCaeMapper;
import com.bridge.applets.model.entity.BridgeIdentifyCae;
import com.bridge.applets.service.BridgeIdentifyCaeService;
import com.bridge.common.enums.YesOrNoEnum;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 预识别有限元数据表 服务实现类
 * </p>
 *
 * @author xyjian
 * @since 2024-11-06
 */
@Service
public class BridgeIdentifyCaeServiceImpl extends ServiceImpl<BridgeIdentifyCaeMapper, BridgeIdentifyCae> implements BridgeIdentifyCaeService {

    @Override
    public BridgeIdentifyCae queryById(Long relationIdentifyCaeId) {
        return this.lambdaQuery()
                .eq(BridgeIdentifyCae::getId,relationIdentifyCaeId)
                .eq(BridgeIdentifyCae::getIsDeleted, YesOrNoEnum.NO.getType())
                .one();
    }

    @Override
    public List<BridgeIdentifyCae> queryByIds(List<Long> icIds) {
        return this.lambdaQuery()
                .in(BridgeIdentifyCae::getId,icIds)
                .eq(BridgeIdentifyCae::getIsDeleted, YesOrNoEnum.NO.getType())
                .list();
    }
}
